#include "stdafx.h"

CSunLog*		g_pSunLog = NULL;

bool MessageOut(BYTE byLogLevel, char *szMsg,...)
{
	char strBuffer[1024]; 

    va_list args; 
    va_start(args, szMsg); 
    _vsnprintf( strBuffer, 1024, szMsg, args ); 
    va_end(args); 

	printf("%s\n", strBuffer);

	if(g_pSunLog)
	{
		return g_pSunLog->InsertMessage( strBuffer, byLogLevel );
	}

	return TRUE;
}
